package org.lvgo.observer;

/**
 * 十六进制观察者
 *
 * @author lvgo
 * @version 1.0
 * @date 2018/9/21 0021 15:49
 */
public class HexObserver extends Observer {

    public HexObserver(Subject subject) {
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    void update() {
        System.out.println("hex string : " + Integer.toHexString(subject.getState()));
    }
}
